import * as actionTypes from "./actionTypes";
import axios from 'axios';
 
import "../../../api/mock.js";
 
 
export const changeDetail = (data) => ({
    type: actionTypes.changeDetail,
    data:data,
})

export const detail = (id) => {
    return (dispatch)=>{
        console.log(11113)
        axios.get("/detail.json?id="+id).then(res=>{
              
             console.log(111,res.data.data)
             dispatch(changeDetail(res.data.data))
        })
    }
}
